<template>
  <wd-img v-bind="$attrs" class="">
    <template #error>
      <view class="h-full w-full flex items-center justify-center bg-gray-100">
        加载失败
      </view>
    </template>
    <template #loading>
      <view class="h-full w-full flex items-center justify-center bg-gray-100">
        <text v-if="!$attrs.src">
          暂无图片
        </text>
        <wd-loading v-else />
      </view>
    </template>
  </wd-img>
</template>
